package cn.shengchao.examstar.rpc.distribute.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: examstarapi
 * @description: 内容是否关联
 * @author: Xiong weiqiang
 * @create: 2025-04-03 15:43
 */
@AllArgsConstructor
@Getter
public enum DistributeContentUserRelationEnum {
    RELATION_NO(0, "未关联"), RELATION_YES(1, "已关联"), RELATION_NOT_BELONG(2, "无权限"),;

    private final int status;
    private final String description;

    public static DistributeContentUserRelationEnum getByStatus(int status) {
        for (DistributeContentUserRelationEnum contentUserRelationEnum : DistributeContentUserRelationEnum.values()) {
            if (contentUserRelationEnum.getStatus() == status) {
                return contentUserRelationEnum;
            }
        }
        return null;
    }
}